package com.mcm.util;

import javax.swing.InputVerifier;
import javax.swing.JComponent;
import javax.swing.JTextField;

public class VerificadorSoloNumeros extends InputVerifier {

	@Override
	public boolean verify(JComponent input) {
		JTextField tf = (JTextField) input;
		try{
			Double.valueOf(tf.getText());
			return true;
		}catch(Exception e)
		{
			return false;
		}
	}
}
